

package com.hazelcast.map.listener;

import com.hazelcast.core.EntryEvent;
import com.hazelcast.spi.annotation.NamespacesSupported;

/**
 * Invoked upon expiration-based removal of an entry.
 * <p>
 * Expiration-based entry removals can happen in two different ways:
 * <ul>
 * <li> time-to-live-seconds based expiration</li>
 * <li> max-idle-time based expiration</li>
 * </ul>
 *
 * @param <K> the type of key.
 * @param <V> the type of value.
 * @since 3.6
 */
@FunctionalInterface
@NamespacesSupported
public interface EntryExpiredListener<K, V> extends MapListener {

    /**
     * Invoked upon expiration of an entry.
     *
     * @param event the event invoked when an entry is expired.
     */
    void entryExpired(EntryEvent<K, V> event);
}
